<extend name="public/base" />
<block name="net_title">
<meta name="description" content="{$term[0]['cltitle']}" />
<meta name="keywords" content="{$term[0]['clintro']}" >
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />

<title>{$term[0]['clsort']}</title>
</block>
<block name="title">
               <h1 class="title">{$term[0]['clsort']}</h1>
</block>

<block name="diy">
     <div class="content">
          <div id="box">
               <h1>{$content[0]['cotitle']}</h1>
				<div id="context" class="text">{$content[0]['cotext']}</div>
               <h3 class="bt"><img src="__PUBLIC__/img/bt-img.png">相关阅读</h3>
               <ul class="bt_list">
                 <foreach name="related" item="vo">
                   <li><a href="{:U('Content/content',array('id'=>$vo['coid']))}"><?php echo $str = substr($vo['cotitle'],0,54); echo "...";?><img src="__PUBLIC__/img/bt-png.png"></a></li>
                 </foreach>
               </ul>
          </div>
     </div>
	 <script>
	$(function(){
		$('#context').find('p').css('line-height', '2em');
		$('#context').find('p').attr('style', '');
		$('#context').find('span').attr('style', 'display:block;text-indent:2em');
		$('#context').find('img').parent().attr('style', 'text-indent:0;');

		$('#context').find('img').each(function(index, element){
			var abc = $(element).attr('src');
			var patt = new RegExp("^((https|http)?:\/\/)[^\s]+");
			//  alert(patt.test(abc));
			if(!patt.test(abc)){
				$(element).attr('src', 'http://www.agriplan.cn'+$(element).attr('src'));
				$(element).attr('style', 'width:5.75rem;center:align;');
				$(element).attr('width', '');
				$(element).attr('height', '');
			}
		});
		$('#context').find('a').each(function(index, element){
			var abc = $(element).attr('href', 'http://www.agriplan.cn'+$(element).attr('href'));
		});

	});
	</script>
</block>